package com.changgou.seckill.controller;

import com.changgou.entity.Result;
import com.changgou.seckill.feign.SeckillOrderFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/wseckillorder")
public class SeckillOrderController {
    @Autowired
    private SeckillOrderFeign seckillOrderFeign;

    @RequestMapping("/add")
    @ResponseBody
    public Result add(String time,Long id){
        Result result = seckillOrderFeign.add(time, id);
        return result;
    }
}
